<?php
namespace app\index\controller;

//use think\Controller;
//use think\View;

class Test
{

    private $view;

    public function __construct()
    {
        $this->view = new \think\View();
    }

    public function index()
    {
        //return '<span style="color:red">这是Test控制器index方法</span>';

        //$this->str = 'testttest';

        //return $this->fetch('index',['str'=>$str]);
        //return $this->fetch('index');

        /*$view = new View();
        $view->str = 'strstrstr';
        return $view->fetch('index');*/

        #$this->view->str = 'str22222';
        return $this->view->fetch('index');


    }

    public function tt()
    {
        //return $this->fetch();

        $this->view->str = 'ttttttttttttt';
        return $this->view->fetch('tt');


    }
}

